import java.io.*;
import javax.swing.*;

class Main {
	public static void main(String[] args) {
		System.out.print("请输入一个实数：");
		String s = "";
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		try {
			s = in.readLine();	
		} catch (IOException e) {
			
		}
		

		double real = Double.parseDouble(s);
		int int_part = (int)real;
		double diff = real - int_part;

		System.out.println(diff);
		System.out.printf("%.4f\n", diff);
		// or
		//JOptionPane.showMessageDialog(null, String.format("%.4f\n", diff));
		
	}
}